package com.zyf.entity;

import java.sql.Date;

public class book {

    int bookId;
    float price;
    String bookName;
    String bookAuther;
    String bookLocation;
    Date enterDate;

    public book(int bookId, float price, String bookName, String bookAuth, String bookLocation, Date enterDate) {
        this.bookId = bookId;
        this.price = price;
        this.bookName = bookName;
        this.bookAuther = bookAuth;
        this.bookLocation = bookLocation;
        this.enterDate = enterDate;
    }

    public book(float price, String bookName, String bookAuther, String bookLocation, Date enterDate) {
        this.price = price;
        this.bookName = bookName;
        this.bookAuther = bookAuther;
        this.bookLocation = bookLocation;
        this.enterDate = enterDate;
    }

    public book() {
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getBookAuther() {
        return bookAuther;
    }

    public void setBookAuther(String bookAuther) {
        this.bookAuther = bookAuther;
    }

    public String getBookLocation() {
        return bookLocation;
    }

    public void setBookLocation(String bookLocation) {
        this.bookLocation = bookLocation;
    }

    public Date getEnterDate() {
        return enterDate;
    }

    public void setEnterDate(Date enterDate) {
        this.enterDate = enterDate;
    }

    @Override
    public String toString() {
        return "book{" +
                "bookId=" + bookId +
                ", price=" + price +
                ", bookName='" + bookName + '\'' +
                ", bookAuther='" + bookAuther + '\'' +
                ", bookLocation='" + bookLocation + '\'' +
                ", enterDate=" + enterDate +
                '}';
    }

    public void showInfo() {
        System.out.println("ID: \t\t" + bookId);
        System.out.println("书名: \t\t" + bookName);
        System.out.println("作者: \t\t" + bookAuther);
        System.out.println("价格: \t\t" + price);
        System.out.println("存放位置: \t" + bookLocation);
        System.out.println("入库日期: \t" + enterDate);
        System.out.println("--------------------");
    }
}
